<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\captcha\Captcha;//设置
?>
<!-- 控制文本框大小 -->
<div class="row">
<div class="col-lg-4">

      <center>
        <h1><font color='black'>注册单</font></h1>
      </center>

      <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?>


<!-- 表单 -->

       <label class="control-label" for="admin-name">用户名</label>
       <?= $form->field($model, 'username')->textInput(['placeholder'=>"请编写用户名"])->label('') ?>

       <label class="control-label" for="admin-password">密码</label>
       <?= $form->field($model, 'password')->passwordInput(['placeholder'=>"请填写密码"])->label('')  ?>

       <label class="control-label" for="admin-email">邮箱</label>
       <?= $form->field($model, 'email')->textInput(['placeholder'=>"请填写邮箱"])->label('') ?>

       <label class="control-label" for="admin-phone">电话</label>
       <?= $form->field($model, 'phone')->textInput(['placeholder'=>"请填写手机号码"])->label('') ?>

       
<!-- 验证码 -->
       <?= $form->field($model, 'yzm')->widget(Captcha::className(), [
          'captchaAction'=>'index/captcha',
           'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
     ]) ?>

<div class="form-group">    
      <?= Html::submitButton('注册', ['class' => 'btn btn-primary']) ?>
      <a href="index.php?r=index/login">
      <?= Html::Button('我已注册,去登录', ['class' => 'btn btn-primary']) ?>
      </a>
</div>   

<?php ActiveForm::end(); ?>

</div>         
</div>            